A hard disk is comprised of one or more circular “disk sheets” (the disk sheet is made of a hard substance, such as aluminum, which is an origin of the word “hard disk”). A single side or double sides of the disk sheet is or are coated with a magnetic material, which is used to record data. Each side has a “read/write head” (which is also referred to as a magnetic head), which is used to check or modify the recorded data. The disk sheet rotates around an ordinary axis. Generally, a rotation speed is 3,600 rotations per minute, 7,200 rotations per minute, or the like. A hard disk with high performance has a higher rotation speed, which can even reach 15,000 rotations per minute. The read/write head moves along a radius of the disk sheet, and such a movement that goes with the rotation of the disk sheet enables the read/write head to access each part at a surface layer.
The surface layer is generally divided into a number of concentric circles, which are generally referred to as tracks, and these tracks are in turn successively divided into a number of sectors. Such division is used for specifying a location on the hard disk and allocating disk space to a file. To find a specific location, of the file, on a disk, it may be only required to point out, for example, “a surface layer 3, the fifth track, the seventh sector”. Generally, sector numbers on all tracks are the same, but some hard disks have more sectors on an outer track (because all sectors have a same physical size, the outer track can contain more sectors). Generally, one sector can contain 512-byte data. The disk cannot process data whose byte count is less than a quantity of bytes in one sector.
Tracks and sectors at all surface layers are divided in a same manner, which means that when a magnetic head at a surface layer is located on a track, a magnetic head at another surface layer is located on a corresponding track. All gathered corresponding tracks are referred to as a cylinder. It takes time for the magnetic head to move from a track to another track. Therefore, frequently-accessed data needs to be placed together (such as a file), so that the frequently-accessed data is in a same cylinder. In this way, the magnetic head does not need to move around (which not only takes time, but also damages the magnetic head), so as to improve performance.
The disk belongs to a mechanical device, and as a usage time prolongs, situations such as a weakened read/write signal on a sector, a degenerated track, and a bad sector on a disk exist. When these situations occur, a read/write operation in the area becomes extremely slow, and a read/write delay substantially increases. In addition, these situations also results in that another normal IO request can only wait in a queue, which blocks the another normal IO request, causes degradation of overall performance of the disk, and makes the disk become a slow disk. The slow disk refers to a disk that has relatively low performance in a storage system.
In the prior art, a manner of slow disk detection and isolation is generally used to resolve the foregoing problems. Currently, slow disk detection is generally performed on a disk device by a device manufacturer. A used algorithm is generally as follows: A threshold is set according to an application; for example, for an IPTV service that is extremely delay-sensitive, it is considered to be slow when one IO whose latency exceeds 300 ms; when over 50 times of IO whose latency exceeds 300 ms occurs within 300 s, the disk is considered as a slow disk, and the entire disk is isolated. Because the entire disk is isolated, other good areas on the disk cannot be used, which causes a great waste.